package cn.edu.pet.entity;

import java.util.List;

public class Page<T> {

    private List<T> items;
    private int totalPages;
    private boolean hasPreviousPage;
    private boolean hasNextPage;

    public Page(List<T> items, int totalPages, boolean hasPreviousPage, boolean hasNextPage) {
        this.items = items;
        this.totalPages = totalPages;
        this.hasPreviousPage = hasPreviousPage;
        this.hasNextPage = hasNextPage;
    }

    public List<T> getItems() {
        return items;
    }

    public int getTotalPages() {
        return totalPages;
    }

    public boolean hasPreviousPage() {
        return hasPreviousPage;
    }

    public boolean hasNextPage() {
        return hasNextPage;
    }
}
